package org.example.controller;

import jakarta.annotation.Resource;
import org.example.domain.Information;
import org.example.domain.InformationDTO;
import org.example.service.InformationService;
import org.example.utils.I18nUtil;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @description:
 * @Author: whopxx
 * @CreateTime: 2025-07-26
 */
@RestController
@RequestMapping("/api")
public class InternationController {

    @Resource
    private InformationService informationService;

    @PostMapping("/search")
    public List<Information> fileterList(@RequestBody InformationDTO informationDTO){
        return informationService.fileterList(informationDTO);
    }


    @GetMapping("/test")
    public String test(){

        return I18nUtil.getMessage("位于华盛顿特区，是美国总统的官邸和办公室");
    }
    @GetMapping("/test2")
    public String test2(){
        return I18nUtil.getMessage("test");
    }
}
